org.neo4j.graphdb.traversal
Enum Uniqueness

java.lang.Object
  extended by java.lang.Enum<Uniqueness>
      extended by org.neo4j.graphdb.traversal.Uniqueness
All Implemented Interfaces:
Serializable, Comparable<Uniqueness>

public enum Uniqueness
extends Enum<Uniqueness>

Represents the type of uniqueness to expect from a traversal, for example the uniqueness of nodes or relationships to visit during a traversal.


Enum Constant Summary
NODE_GLOBAL
          This is what the legacy traversal framework does.
NODE_PATH
          For each returned node there's a path from the start node to it.
NODE_RECENT
          This is like "globally unique", but with the following difference: Traversing a huge graph is quite memory intense in that it keeps track of ALL the nodes it has visited.
NONE
          No restriction (user will have to manage it)
RELATIONSHIP_GLOBAL
          A relationships cannot be traversed more than once, whereas nodes can.
RELATIONSHIP_PATH
          For each returned node there's a path from the start node to it.
RELATIONSHIP_RECENT
          Same as the node version, but for relationships.
 
Method Summary
static Uniqueness valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Uniqueness[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NODE_GLOBAL

public static final Uniqueness NODE_GLOBAL
This is what the legacy traversal framework does. A node cannot be traversed more than once.


NODE_PATH

public static final Uniqueness NODE_PATH
For each returned node there's a path from the start node to it. Any such path is guaranteed to be unique.


NODE_RECENT

public static final Uniqueness NODE_RECENT
This is like "globally unique", but with the following difference: Traversing a huge graph is quite memory intense in that it keeps track of ALL the nodes it has visited. For super huge graphs a traverser can hog all the memory in the JVM, causing OOM exception. With this you can supply a count, which is the number of most recent visited nodes. This can cause a node to be visited more than once, but scales infinitely.


RELATIONSHIP_GLOBAL

public static final Uniqueness RELATIONSHIP_GLOBAL
A relationships cannot be traversed more than once, whereas nodes can.


RELATIONSHIP_PATH

public static final Uniqueness RELATIONSHIP_PATH
For each returned node there's a path from the start node to it. Any such path is guaranteed to be unique (relationship wise).


RELATIONSHIP_RECENT

public static final Uniqueness RELATIONSHIP_RECENT
Same as the node version, but for relationships.


NONE

public static final Uniqueness NONE
No restriction (user will have to manage it)

Method Detail

values

public static Uniqueness[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Uniqueness c : Uniqueness.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Uniqueness valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2010 Neo4j. All Rights Reserved.